package com.zyl.demo.service;

import com.zyl.demo.beans.Home;
import com.zyl.demo.mapper.HomeMapper;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class HomeService {
    @Autowired
    HomeMapper homeMapper;

    public List<Home> getAllHome() {
        return homeMapper.getAllHome();
    }

    public int addHome(Home home) {
        return homeMapper.addHome(home);
    }

    public int deleteHome(int homeId) {
        return homeMapper.deleteHome(homeId);
    }
}
